import org.dreamwork.hyacinth.Mail;
import org.dreamwork.hyacinth.MailManager;

import java.util.Arrays;

/**
 * Created by IntelliJ IDEA.
 * User: seth.yang
 * Date: 12-3-20
 * Time: 下午4:07
 * To change this template use File | Settings | File Templates.
 */
public class Test {
    public static void main (String[] args) throws Exception {
        MailManager mm = MailManager.getMailManager ("a");
        mm.setNeedAuth (true);
        mm.setPassword ("swg123");
        mm.setUserName ("swg_test@163.com");
        mm.setSmtpServer ("smtp.163.com");

        Mail mail = new Mail ();
        mail.setFrom ("swg_test@163.com");
        mail.setTo (Arrays.asList ("zhaomeng@swg.com.cn", "yangyu1977@swg.com.cn"));
        mail.setSubject ("first mail from JAVA");
        mail.setBody ("First mail from JAVA!");

        mm.send (mail);
    }
}
